﻿using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http.Filters;

namespace GoDive.Common
{
    public class WebApiExceptionFilter : ExceptionFilterAttribute
    {
        public override void OnException(HttpActionExecutedContext context)
        {

            var message = context.Exception.Message;
            if (context.Exception.InnerException != null)
                message = context.Exception.InnerException.Message;

            base.OnException(context);
        }
    }
}
